package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "`order`")
public class Order extends BaseEntity implements Serializable {
    /**
     * 订单编号
     */
    @TableId(value = "ORDER_ID", type = IdType.ASSIGN_UUID)
    private String orderId;

    /**
     * 用户编号
     */
    @TableField(value = "USER_ID")
    private Integer userId;

    /**
     * 店铺编号
     */
    @TableField(value = "MERCHANT_ID")
    private Integer merchantId;

    /**
     * 商品编号
     */
    @TableField(value = "SPU_ID")
    private Integer spuId;

    /**
     * 成交价格
     */
    @TableField(value = "ORDER_MONEY")
    private BigDecimal orderMoney;

    /**
     * 订单状态（1待付款，2待发货，3待收货，4已完成，5售后）
     */
    @TableField(value = "ORDER_STATUS")
    private Byte orderStatus;
    @TableField(exist = false)
    private String orderStatusName;
    /**
     * 商品名称
     */
    @TableField(value = "SPU_NAME")
    private String spuName;

    /**
     * 商品单价
     */
    @TableField(value = "SPU_MONEY")
    private Double spuMoney;

    /**
     * 商品规格
     */
    @TableField(value = "SPU_NORMS")
    private String spuNorms;

    /**
     * 规格图片
     */
    @TableField(value = "NORMS_IMG")
    private String normsImg;

    /**
     * 商品数量
     */
    @TableField(value = "MERCHANT_NUM")
    private Integer merchantNum;

    /**
     * 商品优惠劵编号
     */
    @TableField(value = "MERCHANT_COUPON_ID")
    private Integer merchantCouponId;

    /**
     * 物流编号
     */
    @TableField(value = "LOGISTICSL_ID")
    private String logisticslId;

    @TableField(value = "LOGISTICSL_CODE")
    private String logisticslCode;

    /**
     * 下单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "ORDER_TIME")
    private Date orderTime;

    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "PAY_TIME")
    private Date payTime;

    /**
     * 发货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "DELIVERY_TIME")
    private Date deliveryTime;

    /**
     * 收货时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "RECEIVING_TIME")
    private Date receivingTime;

    /**
     * 订单备注
     */
    @TableField(value = "ORDER_REMARKS")
    private String orderRemarks;

    /**
     * 支付方式
     */
    @TableField(value = "PAY_MODE")
    private String payMode;

    /**
     * 交易号
     */
    @TableField(value = "TRANSACTION_NUM")
    private String transactionNum;

    /**
     * 运费
     */
    @TableField(value = "FREIGHT")
    private Long freight;

    /**
     * 收货地址
     */
    @TableField(value = "SHIPPING_ADDRESS")
    private String shippingAddress;

    /**
     * 收件人
     */
    @TableField(value = "ADDRESSEEE")
    private String addresseee;

    /**
     * 手机号
     */
    @TableField(value = "PHONE")
    private String phone;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    private Integer createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "CREATE_TIME")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "UPDATE_TIME")
    private Date updateTime;
    /**
     * 服务ID
     */
    @TableField(value = "SERVICE_ENSURE_ID")
    private Integer serviceEnsureId;
    /**
     * sukID
     */
    @TableField(value = "SKU_ID")
    private Integer skuId;

    private static final long serialVersionUID = 1L;

    public static final String COL_ORDER_ID = "ORDER_ID";

    public static final String COL_USER_ID = "USER_ID";

    public static final String COL_MERCHANT_ID = "MERCHANT_ID";

    public static final String COL_SPU_ID = "SPU_ID";

    public static final String COL_ORDER_MONEY = "ORDER_MONEY";

    public static final String COL_ORDER_STATUS = "ORDER_STATUS";

    public static final String COL_SPU_NAME = "SPU_NAME";

    public static final String COL_SPU_MONEY = "SPU_MONEY";

    public static final String COL_SPU_NORMS = "SPU_NORMS";

    public static final String COL_NORMS_IMG = "NORMS_IMG";

    public static final String COL_MERCHANT_NUM = "MERCHANT_NUM";

    public static final String COL_MERCHANT_COUPON_ID = "MERCHANT_COUPON_ID";

    public static final String COL_LOGISTICSL_ID = "LOGISTICSL_ID";

    public static final String COL_ORDER_TIME = "ORDER_TIME";

    public static final String COL_PAY_TIME = "PAY_TIME";

    public static final String COL_DELIVERY_TIME = "DELIVERY_TIME";

    public static final String COL_RECEIVING_TIME = "RECEIVING_TIME";

    public static final String COL_ORDER_REMARKS = "ORDER_REMARKS";

    public static final String COL_PAY_MODE = "PAY_MODE";

    public static final String COL_TRANSACTION_NUM = "TRANSACTION_NUM";

    public static final String COL_FREIGHT = "FREIGHT";

    public static final String COL_SHIPPING_ADDRESS = "SHIPPING_ADDRESS";

    public static final String COL_ADDRESSEEE = "ADDRESSEEE";

    public static final String COL_PHONE = "PHONE";

    public static final String COL_CREATE_BY = "CREATE_BY";

    public static final String COL_CREATE_TIME = "CREATE_TIME";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
